namespace Expect.Documentation.Base_concepts
{
    using System;
    using Expect.Core;
    using Expect.Core.Fixtures;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    
    
    // This file is intended to contain your fixtures, you could modify it's content freely because it won't be generated again
    // Please note that if you rename the parent .expect file, this file will not be renamed automatically
    public partial class FixtureMethodsContainer : Expect.Core.Interfaces.ISpecificationContainer
    {
        [FixtureHint("Expect |*| isn't it ?")]
        [FixtureHint("This is a tool that |*|, isn't it ?")]
        public void ExpectIsnTIt(string qualifier)
        {
			Assert.AreEqual("rocks", qualifier);
        }

        [FixtureHint("This is a fixture |*| with |*|")]
        public void ThisIsAFixtureWith(string fixtureType, string fixtureOptions)
        {
            Context.Data["SimpleMethod"] = true;
        }

        [FixtureHint("Another way to write the fixture |*| with |*|")]
        [FixtureHint("This is a fixture |*| with |*|")]
        public void ThisIsAFixtureWith(string fixtureType, string fixtureOptions, FixtureData data)
        {
            Assert.AreEqual("method", fixtureType);
            Assert.AreEqual("fixture data", fixtureOptions);

            Assert.AreEqual("11", data[0]["Col 1"]);
            Assert.AreEqual("12", data[0]["Col 2"]);
            Assert.AreEqual("13", data[0]["Col 3"]);

            Assert.AreEqual("21", data[1]["Col 1"]);
            Assert.AreEqual("22", data[1]["Col 2"]);
            Assert.AreEqual("23", data[1]["Col 3"]);
        }

        [FixtureHint("When resolving a fixture, method with fixture data have priority over \"simple\" fixture methods.")]
        public void WhenResolvingAFixtureMethodWithFixtureDataHavePriorityOverSimpleFixtureMethods()
        {
            Assert.IsFalse(Context.Data.ContainsKey("SimpleMethod"), "Simple method should not have been called");
        }
    }
}

